/**
 * @author xuyh0817
 * @email xuyh0817@foxmail.com
 * @date 2022-02-16 01:41
 * @version 2.0.0
 * @doc todo
 * @website todo
 * @remark  如果要分发源码，需在本文件顶部保留此文件头信息！！
 */
import { COMPONENT_TYPE } from '../../constants'

export default [
  {
    id: '1',
    type: COMPONENT_TYPE.INPUT,
    formItem: {
      prop: 'value',
      rules: [],
      label: '默认值',
      extra: 'value(v-model) 使用","分隔',
    },
    attrs: {
      value: '10,20',
      maxLength: 100,
      type: 'text',
      allowClear: true,
      placeholder: '请输入默认值'
    }
  },
  {
    id: '2',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'disabled',
      rules: [],
      label: '禁用状态',
      extra: '是否禁用状态，默认为 false,整组失效',
    },
    attrs: {
      checked: false
    }
  },
  {
    id: '3',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'dots',
      rules: [],
      label: '拖拽刻度',
      extra: '是否只能拖拽到刻度上',
    },
    attrs: {
      checked: false
    }
  },
  {
    id: '4',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'included',
      rules: [],
      label: '包含刻度',
      extra: 'marks 不为空对象时有效，值为 true 时表示值为包含关系，false 表示并列',
    },
    attrs: {
      checked: true
    }
  },
  {
    id: '5',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'reverse',
      rules: [],
      label: '反向坐标轴',
      extra: '反向坐标轴',
    },
    attrs: {
      checked: false
    }
  },
  {
    id: '6',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'hasInput',
      rules: [],
      label: '数字输入框',
      extra: '开启数字输入框',
    },
    attrs: {
      checked: false
    }
  },
  {
    id: '7',
    type: COMPONENT_TYPE.INPUT_NUMBER,
    formItem: {
      prop: 'max',
      rules: [],
      label: '最大值',
    },
    attrs: {
      value: 100,
      max: 9999,
      min: -9999,
      placeholder: '请输入最大值'
    }
  },
  {
    id: '8',
    type: COMPONENT_TYPE.INPUT_NUMBER,
    formItem: {
      prop: 'min',
      rules: [],
      label: '最小值',
    },
    attrs: {
      value: 0,
      min: -9999,
      max: 9999,
      placeholder: '请输入最小值'
    }
  },
  {
    id: '9',
    type: COMPONENT_TYPE.INPUT,
    formItem: {
      prop: 'step',
      rules: [],
      label: '步数',
      extra: '步长，取值必须大于 0，并且可被 (max - min) 整除。当 marks 不为空对象时，可以设置 step 为 null，此时 Slider 的可选值仅有 marks 标出来的部分。',
    },
    attrs: {
      value: 1,
      allowClear: false,
      placeholder: '请输入步数',
      type: 'number'
    }
  },
  {
    id: '10',
    type: COMPONENT_TYPE.SELECT,
    formItem: {
      prop: 'tooltipPlacement',
      rules: [],
      label: 'Tooltip位置',
      extra: '设置 Tooltip 展示位置',
    },
    attrs: {
      value: 'top',
      placeholder: '请选择',
      children: '[{"label":"top","value":"top"},{"label":"left","value":"left"},{"label":"right","value":"right"},{"label":"bottom","value":"bottom"},{"label":"topLeft","value":"topLeft"},{"label":"topRight","value":"topRight"},{"label":"bottomLeft","value":"bottomLeft"},{"label":"bottomRight","value":"bottomRight"},{"label":"leftTop","value":"leftTop"},{"label":"leftBottom","value":"leftBottom"},{"label":"rightTop","value":"rightTop"},{"label":"rightBottom","value":"rightBottom"}]'
    }
  },
  {
    id: '11',
    type: COMPONENT_TYPE.TEXTAREA,
    formItem: {
      prop: 'marks',
      rules: [],
      label: '刻度标记',
      extra: '刻度标记，key 的类型必须为 number 且取值在闭区间 [min, max] 内，每个标签可以单独设置样式',
    },
    attrs: {
      autoSize: {
        minRows: 4
      },
      value: '{}',
      maxLength: 1000,
      allowClear: true,
      placeholder: '请输入关联赋值项'
    }
  }
]
